import requests

url = "https://watch-mgmt.okii.com/smartwatchmgmt/problemLocate/dataQuery/search/getBasicData"  # 正式环境
# url = "http://watchmgmt.module.okii.com/smartwatchmgmt/problemLocate/dataQuery/search/getBasicData"  # 模块环境
post_data = {
    "bindNO": "akcfnhtjnbdqeojh",
    "tableName": "basicTable",
    "search": "false",
    "nd": "1562404565385",
    "rows": "10",
    "page": "1",
    "sidx": "",
    "sord": "asc",
}
# headers = {#module_headers
#     "Cookie": "JSESSIONID=7D6F79DFB7F0F29D6EF24D3BA1714752",
# ###只有JSESSIONID有用，是否有时效性
#     "Host": "watch-mgmt.okii.com",
#     "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
# }

headers = {#module_headers
    "Cookie": "JSESSIONID=1F74C6C679EEBDB6A4AC7A8BE2DD8551",
###只有JSESSIONID有用，是否有时效性
    "Host": "watch-mgmt.okii.com",
    "User-Agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",
}

def get_http(url):
    response = requests.request(url=url,method="post",headers=headers,data=post_data,verify=False)
    response.raise_for_status()
    print(response.text)



if __name__ == '__main__':
    get_http(url)